package file;

import java.io.File;
import java.io.IOException;

public class text {
    public static void main(String[] args) throws IOException {
        for (int i = 1;i <= 100; i++) {
            File file = new File("text" + i + ".txt");
            if (file.exists()) {
                System.out.println("该文件已存在");
            } else {
                file.createNewFile();
                System.out.println("文件创建完毕");
            }
        }
        }
    }


